package com.hngd.service;

import com.hngd.dao.CategoryMapper;
import com.hngd.model.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service  //交给springboot容器处理
public class CategoryService {

    //注入dao接口
    //@Autowired
    @Resource
    private CategoryMapper mapper;

    public List<Category> findAll(){
        List<Category> findList = mapper.findAll();
        return findList;
    }
}
